﻿using RpcHelper.Validate;
namespace Wedonek.RpcStore.Gateway.Model
{
        /// <summary>
        /// 任务信息
        /// </summary>
        public class AddAutoTask
        {
                /// <summary>
                /// 所属区域Id
                /// </summary>
                [NumValidate("rpc.task.region.id.error", 1)]
                public long RegionId
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务名
                /// </summary>
                [NullValidate("rpc.task.name.null")]
                [LenValidate("rpc.task.name.len",2,50)]
                public string TaskName
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务说明
                /// </summary>
                [LenValidate ("rpc.task.show.len", 0, 255)]
                public string TaskShow
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务优先级
                /// </summary>
                [NumValidate ("rpc.task.priority.error", 0,int.MaxValue)]
                public int TaskPriority
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务开始的步骤
                /// </summary>
                [NumValidate ("rpc.task.begin.error", 0, short.MaxValue)]
                public short BeginItem
                {
                        get;
                        set;
                }
                /// <summary>
                /// 任务失败时通知的Emall列表
                /// </summary>
                [FormatValidate ("rpc.task.fail.email.error",  ValidateFormat.Email)]
                public string[] FailEmall
                {
                        get;
                        set;
                }
        }
}
